package frsf.cidisi.exercise.arql.situationCalculus;

import frsf.cidisi.faia.agent.Action;
import frsf.cidisi.faia.environment.Environment;


public class IslaEmiroce extends Environment {

    public IslaEmiroce() {
        this.environmentState = new EstadoIsla();
    }

    @Override
    public EstadoIsla getEnvironmentState() {
        return (EstadoIsla) super.getEnvironmentState();
    }

    @Override
    public boolean agentFailed(Action action) {

        //TODO: Complete Method

        return false;
    }

    @Override
    public ArqLogicoPerception getPercept() {
        // Create a new perception to return
        ArqLogicoPerception perception = new ArqLogicoPerception();
        
		EstadoIsla estadoIsla= this.getEnvironmentState();
		 
		perception.setcamara(estadoIsla.getTesoroCiudadActual());
		perception.setgps(estadoIsla.getposicionArqueologo());
		perception.setsatelite(estadoIsla.getMapaTesoros());
		perception.setsensorpirata(estadoIsla.getposicionArqueologo().equals(estadoIsla.getposicionPirata()));

       // Return the perception
       return perception;
   }
    
    @Override
    public String toString() {
        return this.environmentState.toString();
    }
}
